package com.study.springboot.mybatisplugin.category;


import com.study.springboot.mybatisplugin.Category;
import com.study.springboot.mybatisplugin.CategoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/v1/cat")
@Slf4j
public class CategoryController {
    @Autowired
    private CategoryService categoryService;
    @RequestMapping("/save")
    public void save(){
        Category result =new Category();
        result.setCatName("hai");
        result.setDescr("描述");
        categoryService.saveCategory(result);
    }

}
